package routers

import (
	"covalence/controllers"
	"github.com/astaxie/beego"
)

func init() {
	//beego.Router("/", &controllers.MainController{})

	/*
	** /CBDB/LigandBrowse: get basic info of ligands within one page
	** /CBDB/LigandDetails: get details info of one ligand
	 */
	beego.Router("/", &controllers.LigandController{}, "*:Index")
	beego.Router("/CBDB", &controllers.LigandController{}, "*:Index")
	beego.Router("/CBDB/MoleculeBrowse.html", &controllers.LigandController{}, "*:ShowHTML")
	beego.Router("/CBDB/LigandBrowse", &controllers.LigandController{}, "*:Browse")
	beego.Router("/CBDB/LigandDetails", &controllers.LigandController{}, "*:GetDetailsOfLigand")
	beego.Router("/CBDB/LigandTextQuery", &controllers.LigandController{}, "*:TextQuery")
	beego.Router("/CBDB/LigandStructureQuery", &controllers.LigandController{}, "*:StructureQuery")
	beego.Router("/CBDB/QueryByTrgOrGene", &controllers.LigandController{}, "*:QueryByTrgOrGene")
	beego.Router("/CBDB/GetQueryHits", &controllers.LigandController{}, "*:GetQueryHits")

	beego.Router("/CBDB/MolSearchResults.html", &controllers.LigandController{}, "*:ShowResultsHTML")

	beego.Router("/CBDB/TargetBrowse.html", &controllers.TargetController{}, "*:ShowHTML")
	beego.Router("/CBDB/TargetBrowse", &controllers.TargetController{}, "*:Browse")
	beego.Router("/CBDB/TargetDetails", &controllers.TargetController{}, "*:GetDetailsOfTarget")
	beego.Router("/CBDB/TargetQuery", &controllers.TargetController{}, "*:Query")
	beego.Router("/CBDB/TrgSearchResults.html", &controllers.TargetController{}, "*:ShowResultsHTML")
	beego.Router("/CBDB/TargetPdb", &controllers.TargetController{}, "*:GetPdbFile")

	beego.Router("/CBDB/ReferenceBrowse.html", &controllers.RefController{}, "*:ShowHTML")
	beego.Router("/CBDB/RefBrowse", &controllers.RefController{}, "*:Browse")
	beego.Router("/CBDB/RefQuery", &controllers.RefController{}, "*:Query")

	beego.Router("/CBDB/search.html", &controllers.OtherController{}, "*:ShowSearchHtml")
	beego.Router("/CBDB/contact.html", &controllers.OtherController{}, "*:ShowContactHtml")
	beego.Router("/CBDB/help.html", &controllers.OtherController{}, "*:ShowHelpHtml")
	beego.Router("/CBDB/download.html", &controllers.OtherController{}, "*:ShowDownloadHtml")

	beego.Router("/marvin4js-license.cxl", &controllers.MainController{}, "get:Marvin4js")
}
